let a = 1;
let b = 'world!';

let c = function(x) {
    console.log('Hello ' + x + a);
};

function doSomething(callback) {
    //setTimeout(callback, 0);
    console.log('begin');
    if (Object.prototype.toString.call(callback) === '[object Function]') {
        process.nextTick(callback);
    }
    somethingComplicated();
    console.log('end');
}

doSomething(function() {
    compute();
});
console.log('process.argv', process.argv);

function somethingComplicated() {
    for (let i = 0; i < 5; i++) {
        console.log(i);
    }
}
function compute() {
    for (let i = 5; i < 10; i++) {
        console.log(i);
    }
}
